Build with -ffreestanding on m68k to avoid risky optimizations involving libc
authorFinn Thain <fthain@telegraphics.com.au>
Fri, 21 Dec 2018 06:21:43 +0000 (17:21 +1100)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 15 Mar 2019 02:16:04 +0000 (02:16 +0000)
Gbp-Pq: Topic bugfix/m68k
Gbp-Pq: Name m68k-build-with-ffreestanding.patch

arch/m68k/Makefile

index 997c9f20ea0f937667031760193efe02fec00faf..c318afd15e336bfb6ed30ecfe83b52e18f44d28f 100644 (file)
@@ -58,7 +58,7 @@ cpuflags-$(CONFIG_M5206e)     := $(call cc-option,-mcpu=5206e,-m5200)
 cpuflags-$(CONFIG_M5206)       := $(call cc-option,-mcpu=5206,-m5200)
 
 KBUILD_AFLAGS += $(cpuflags-y)
-KBUILD_CFLAGS += $(cpuflags-y) -pipe
+KBUILD_CFLAGS += $(cpuflags-y)
 ifdef CONFIG_MMU
 # without -fno-strength-reduce the 53c7xx.c driver fails ;-(
 KBUILD_CFLAGS += -fno-strength-reduce -ffixed-a2
@@ -69,6 +69,8 @@ KBUILD_CFLAGS += -D__uClinux__
 KBUILD_AFLAGS += -D__uClinux__
 endif
 
+KBUILD_CFLAGS += -pipe -ffreestanding
+
 KBUILD_LDFLAGS := -m m68kelf
 KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds